<template>
  <div ref="numRef">1</div>
</template>

<script lang="ts" setup>
import { ref, onMounted } from 'vue'
import { gsap } from 'gsap'
const numRef = ref()
// const tl = gsap.timeline()
onMounted(() => {
  let start = 1
  let end = 1000
  gsap.fromTo(numRef.value, {
    innerText: start
  }, {
    innerText: end,
    snap: {
      innerText: 0.01
    },
    duration: 3,
    ease: 'linear'
  })
})
</script>

<style lang="scss" scoped>

</style>
